<?php
/**
 * User: 五哥派
 * Date: 2024/7/1
 * Tel(同WX): 17335592719
 */
namespace app\admin\model\dealer;

use app\admin\model\Base;

class Apply extends Base{

    protected $name = 'dealer_apply';

    public function user(){
        return $this->belongsTo('app\admin\model\user\User','user_id');
    }


    public function getList($where=array()){
        return self::with([
            'user'=>function($query){
                $query->field('id,nick_name,avatar, avatar as avatarfull');
            }
        ])->where($where)->order($this->order)->paginate($this->limit, false);
    }

}